<div id="content">
    <div id="title_content">User</div>
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
       
            <table class="list" width="100%">
                <thead>
                    <tr>
                        
                        <th><?php echo lang('user_name'); ?></th>
                        <th><?php echo lang('email')?></th>
                        <th><?php echo lang('create_on')?></th>
                        <th><?php echo lang('last_login')?></th>
                        <th><?php echo lang('active')?></th>
                        <th><?php echo lang('role')?></th>
                        
                        <th colspan="2">Action</th>
                    </tr>
                </thead>
                <tbody>
                <?php 
                if(isset($users_data) && !empty($users_data)):
                foreach($users_data as $aRows){
               	?>
                    <tr>
                      

                        <td><?php echo $aRows['user_name']; ?></td>
                        <td><?php echo $aRows['email']; ?></td>
                        <td><?php echo $aRows['created_on']; ?></td>
                        <td><?php echo $aRows['last_login']; ?></td>
                        <?php if($this->session->userdata("role_id") == 1){?>
                        <td><a href="<?php echo site_url('admin/changement/' . $aRows['id']) ?>" onClick="confirm('Change le status ?')"
><?php echo $aRows['active']; ?></a></td>
						<?php }else{?>
						<td><?php echo $aRows['active']; ?></a></td>
						<?php }?>
                        <td><?php echo $aRows['role_name']; ?></td>
                       
                        <td width="30px"><a href="<?php echo site_url('admin/view_profile/' . $aRows['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/modifier.png" alt="modifier"/></a></td>
                        <?php if($this->session->userdata("role_id") == 1):?>
                        <td width="30px"><a class="confirm_delete" href="<?php echo site_url('admin/supprimer/' . $aRows['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>
                    	<?php endif;?>
                    </tr>
                <?php } ?>
                <?php endif;?>
                </tbody>
            </table>
            <div class="delete_button">
                <table width="100%">
                    <tr>
                       
                        <td align="right"><?php echo $pagination; ?></td>
                </tr>
            </table>
        </div>
        <!--END delete_button-->
    
</div>
<!--END content-->
